package com.pth.admin.action;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.pth.model.Exam;
import com.pth.model.UserInfo;
import com.pth.service.ExamService;
import com.pth.service.UserInfoService;

public class PrintUserAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private int eid;
	private List<Exam> exams;
	private ExamService examService;
	private UserInfoService infoService;
	private List<UserInfo> infos;
	private int usernumByeid;
	private UserInfo userInfo;

	
	public String print() throws Exception {

		infos=infoService.getUserByeidNOpager(eid);
		usernumByeid=infos.size();
		//exams=examService.getAllExams();
		return SUCCESS;
	
	}
	
	public String selectExam() throws Exception{
		
		exams=examService.getAllExams();
		return "selectExam";
	}

	public int getEid() {
		return eid;
	}
	public List<Exam> getExams() {
		return exams;
	}
	public ExamService getExamService() {
		return examService;
	}
	public UserInfoService getInfoService() {
		return infoService;
	}

	public UserInfo getUserInfo() {
		return userInfo;
	}
	public void setEid(int eid) {
		this.eid = eid;
	}
	public void setExams(List<Exam> exams) {
		this.exams = exams;
	}
	public void setExamService(ExamService examService) {
		this.examService = examService;
	}
	
	public void setInfoService(UserInfoService infoService) {
		this.infoService = infoService;
	}
	
	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}

	public void setInfos(List<UserInfo> infos) {
		this.infos = infos;
	}

	public List<UserInfo> getInfos() {
		return infos;
	}

	public void setUsernumByeid(int usernumByeid) {
		this.usernumByeid = usernumByeid;
	}

	public int getUsernumByeid() {
		return usernumByeid;
	}
	
}
